package com.git.riskwarning;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;

import org.apache.log4j.Logger;

import com.git.riskwarning.dao.RiskDaoImpl;

import git.bankview.sl.schedule.ITask;
import git.bankview.sl.schedule.TaskException;

public class RiskWarnTask implements ITask{
	
	private static Logger log = Logger.getLogger(RiskWarnTask.class);
	
	@Override
	public void setParameters(Properties oParams) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onTerminate() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String execute(Date oDateKey) throws TaskException {
		RiskDaoImpl rd = new RiskDaoImpl();
		SimpleDateFormat f = new SimpleDateFormat("yyyyMMdd");
		rd.runRiskWarnTask(f.format(oDateKey));
		return "";
	}

}
